package net.chrisrichardson.cloudtools.maven.plugins;

import net.chrisrichardson.ec2deployer.cluster.ClusterManager;
import net.chrisrichardson.ec2deployer.cluster.SimpleCluster;

/**
 * Goal which redeploys the web application on the Tomcat 
 * servers 
 * 
 * @goal clone
 * 
 */
public class CloneMojo extends AbstractClusterMojo {

  /**
   * The name of the cluster to manage
   * @parameter expression="${cloudtools.new.cluster.name}"
   * @required
   * 
   */
  protected String newClusterName;

  
 @Override
  protected void executeWithCluster(ClusterManager manager, SimpleCluster cluster) {
    manager.cloneCluster(cluster, newClusterName);
  }
}
